package top.go2do.common.redis;

/**
 * @Description
 * @Author xingyj
 * @CreateTime 2025/3/31 13:01
 */
public class RedisKey {
    public static final String KEY_PREFIX_PWD_ERROR="pwd_error:";
    public static final String KEY_PREFIX_LOGIN_CAPTCHA="login_captcha:";
    public static final String KEY_PREFIX_TOKEN_USER="token_user_info:";
    public static final String KEY_EMAIL_VERIFY_CODE="email_verify_code:";
    public static String getPasswordErrorKey(Long userId) {
        return KEY_PREFIX_PWD_ERROR + userId;
    }

    public static String getCaptchaIdKey(Long userId) {
        return KEY_PREFIX_LOGIN_CAPTCHA + userId;
    }

    public static String getCaptchaIdKey(String id) {
        return KEY_PREFIX_LOGIN_CAPTCHA + id;
    }

    public static String getTokenUserInfoKey(Long userId) {
        return KEY_PREFIX_TOKEN_USER + userId;
    }

    public static String getKeyEmailVerifyCode(String email) {
        return KEY_EMAIL_VERIFY_CODE + email;
    }
}
